package com.xiaoze.provider.service.impl;

import com.xiaoze.api.entity.User;
import com.xiaoze.api.service.UserService;
import com.xiaoze.provider.mapper.UserMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * UserServiceImpl
 *
 * @author xiaoze
 * @date 2018/6/3
 *
 */
@DubboService(version = "${demo.service.version}", interfaceClass = UserService.class)
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User get(String userNo) {
        return userMapper.selectById(userNo);
    }
}